package puntaelena.facilitylocation.hillclimbing.solver.services;

import puntaelena.graphsupport.FacilitiesGraph;
import static puntaelena.facilitylocation.hillclimbing.solver.agents.FcltCityNegotiateComputator.*;

public class DefaultFcltLocDataService
	implements IFcltLocDataService
{
	private FacilitiesGraph fgraph;
	private boolean[] isFcltOpen;
	private int[] witnesses;
	private int solutionVersion = INIT_VERSION;

	@Override
	public void setFacilityLocationData(
		FacilitiesGraph fgraph,
		boolean[] isFcltOpen,
		int[] witnesses
	) {
		this.fgraph = fgraph;
		this.isFcltOpen = isFcltOpen;
		this.witnesses = witnesses;
	}

	@Override
	public FacilitiesGraph getFgraph() {
		return fgraph;
	}

	@Override
	public boolean[] getFcltOpen() {
		return isFcltOpen;
	}

	@Override
	public int[] getWitnesses() {
		return witnesses;
	}

	@Override
	public int getSolutionVersion() {
		return solutionVersion;
	}

	@Override
	public void increaseSolutionVersion() {
		solutionVersion++;
	}
}
